/**
	Used by the ToolTipController to Construct the actual tooltip

	@author Matthew Richmond
	@version 2007-01-19

	@usage
	When initalizing the ToolTipController class, if you dont supply a second argument the ToolTipController will use this class to create the actual tooltip.


	- Activate with:
	<code>


	ToolTipController.init(this)


	</code>

*/
class timber.ui.ToolTipDefaultView {

	private var f:TextFormat;

// ===========================================================
// - CONSTRUCTOR
// ===========================================================

	function ToolTipDefaultView () {
		//trace("ToolTipDefaultView");
		
		f = new TextFormat();
		f.font = "Trebuchet MS";
		f.size = 10;
	};

	function create (obj:MovieClip, val:String):MovieClip{
		//trace("ToolTipDefault: create");
		
		var d = obj.getNextHighestDepth();
		var mc:MovieClip = obj.createEmptyMovieClip("tip_mc", d);
		
		// field
		var field:TextField = mc.createTextField("tip_txt", 1, 0, 0, 10, 10);
		//field.border = true;
		//field.background = true;
		field.selectable = false;
		field.autoSize = true;
		field.type = "display";
		field.embedFonts = false;
		//field.antiAliasType = "advanced";
		field.text = val;
		field.setTextFormat(f);
		
		// vars
		var padX:Number = 0;
		var padY:Number = 0;
		var bufferX:Number = 5;
		var bufferY:Number = 3;
		var padWidth:Number = field.textWidth + bufferX;
		var padHeight:Number = field.textHeight + bufferY;
		
		// box
		mc.beginFill(0xFFFFD2, 100);
		mc.lineStyle(1, 0xB0B0B0, 100);
		mc.moveTo( padX, padY );
		mc.lineTo( (padX + padWidth), padY );
		mc.lineTo( (padX + padWidth), (padY + padHeight) );
		mc.lineTo( padX, (padY + padHeight) );
		mc.endFill();
		
		return mc;
	};

};